package com.server.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.server.entity.UpmsRole;
import com.server.entity.UpmsUserRole;
import com.server.util.Result;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
 * <p>
 * 用户角色关联表 服务类
 * </p>
 *
 * @author
 * @since 2020-04-03
 */
public interface IUpmsUserRoleService extends IService<UpmsUserRole> {

	/**
     * 新增
     * @param upmsuserrole
     * @return
     * @author
     * @Date 2020-04-03
     */
    public Result add(UpmsUserRole upmsuserrole);

    /**
     * 批量删除
     * @param ids
     * @return
     * @author
     * @Date 2020-04-03
     */
    public Boolean delete(String ids);

    /**
     * 更新
     * @param upmsuserrole
     * @return
     * @author
     * @Date 2020-04-03
     */
    public Result update(UpmsUserRole upmsuserrole);

    /**
     * 根据id查询列表
     * @param id
     * @return UpmsUserRole
     * @author
     * @Date 2020-04-03
     */
    public UpmsUserRole findById(String id);


    /**
     * 查询分页数据
     * @param page
     * @return
     * @author
     * @Date 2020-04-03
     */
     public Result<List<UpmsUserRole>> findPage(Page<UpmsUserRole> page);

    /**
     * 根据userId查询拥有角色
     * @param userId
     * @return
     * @author
     * @Date 2020-04-03
     */
    List<UpmsRole> findByUserId(Integer userId);
}
